//
//  AboutUsViewController.m
//  PlayerFix
//
//  Created by DAT on 15/11/10.
//  Copyright © 2015年 DAT. All rights reserved.
//

#import "AboutUsViewController.h"
#import <SDImageCache.h>

@interface AboutUsViewController ()

@property (nonatomic, strong) UIImageView *iconImg;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *subTitleLabel;
@property (nonatomic, strong) UILabel *descriptionLabel;
@property (nonatomic, strong) UILabel *versionLabel;
@property (nonatomic, strong) UIView *naView;
@property (nonatomic, strong) UILabel *naTitle;



@end

@implementation AboutUsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.naView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 64)];
    self.naView.backgroundColor = [UIColor colorWithRed:30 / 255.0 green:80 / 255.0 blue:100 / 255.0 alpha:1];
    [self.view addSubview:self.naView];
    
    self.naTitle = [[UILabel alloc] initWithFrame:CGRectMake((375 - 100) / 2, 25, 100, 30)];
    self.naTitle.backgroundColor = [UIColor clearColor];
    self.naTitle.textColor = [UIColor whiteColor];
    self.naTitle.textAlignment = NSTextAlignmentCenter;
    self.naTitle.font = [UIFont boldSystemFontOfSize:18];
    self.naTitle.text = @"关于我们";
    [self.naView addSubview:self.naTitle];
    
    UIButton *goBackBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    goBackBtn.frame = CGRectMake(10, 25, 30, 30);
    goBackBtn.backgroundColor = [UIColor clearColor];
    [goBackBtn setBackgroundImage:[UIImage imageNamed:@"backBtn.png"] forState:UIControlStateNormal];
    [goBackBtn addTarget:self action:@selector(goBackAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.naView addSubview:goBackBtn];

    
    
    self.iconImg = [[UIImageView alloc] initWithFrame:CGRectMake((375 - 90) / 2, 140, 90, 90)];
    self.iconImg.image = [UIImage imageNamed:@"aboutIcon.png"];
    [self.view addSubview:self.iconImg];
    
    
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake((375 - 150) / 2, 240, 150, 20)];
    self.titleLabel.text = @"Mix Player";
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.titleLabel.font = [UIFont systemFontOfSize:20 weight:9];
    self.titleLabel.textColor = [UIColor colorWithRed:0.25 green:0.25 blue:0.25 alpha:1];
    [self.view addSubview:self.titleLabel];
    
    self.subTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 265, 375, 20)];
    self.subTitleLabel.text = @"致力于创造极致视听体验";
    self.subTitleLabel.textAlignment = NSTextAlignmentCenter;
    self.subTitleLabel.font = [UIFont systemFontOfSize:14];
    self.subTitleLabel.textColor = [UIColor colorWithRed: 0.41 green:0.41 blue:0.41 alpha:1.0];
    [self.view addSubview:self.subTitleLabel];
    
    
    self.descriptionLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 400, 335, 200)];
    self.descriptionLabel.backgroundColor = [UIColor lightGrayColor];
    [self.view addSubview:self.descriptionLabel];
    
    self.versionLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 640, 375, 15)];
    self.versionLabel.text = @"Version : 1.0";
    self.versionLabel.font = [UIFont boldSystemFontOfSize:12];
    self.versionLabel.textAlignment = NSTextAlignmentCenter;
    self.versionLabel.textColor = [UIColor colorWithRed:0.41 green:0.41 blue:0.41 alpha:1.0];
    [self.view addSubview:self.versionLabel];
    
}

- (void)goBackAction:(UIButton *)btn{
    
    [self dismissViewControllerAnimated:YES completion:^{
        
        
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
